(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5123,6784],{55725:function(e,t){"use strict";let r=async e=>new Promise(t=>setTimeout(t,e));t.Z=r},85123:function(e,t,r){"use strict";r.r(t),r.d(t,{InlineFormWrapper:function(){return T}});var a=r(85893),n=r(67294),i=r(11163),o=r(41222),c=r(59778),l=r(16784),s=r(22234),u=r(57557),d=r.n(u),p=r(32757),f=r(96219),h=r(48775),g=r(66195),m=r(20061),v=r(77513),b=r(42999),w=r(6545),y=r(83868),k=r.n(y),C=r(86471),S=r(98220),x=r(95893),E=r(76114),P=r(61911),j=r(38290),L=r(75846),Z=r(73935),_=r(71077),R=r.n(_);let T=e=>{let{children:t,optIn:r,type:u,autoSub:y,media:_,mailingList:T,className:D,parentId:A}=e,{translator:W}=(0,s.I)(),{language:$}=(0,f.q)(),z=(0,p.u)(),{country:N,isLoggedIn:F}=(0,h.S)(),B=(0,g.v)(),[K,V]=(0,n.useState)(""),[q,H]=(0,n.useState)(""),[I,O]=(0,n.useState)(!1),X=(0,i.useRouter)(),J=(0,w.Ke)(),[Y,G]=(0,n.useState)(!1),[M,Q]=(0,n.useState)(!1),[U,ee]=(0,n.useState)(!1),[et,er]=(0,n.useState)(null);(0,n.useEffect)(()=>{if(A){let e=document.getElementById(A);er((null==e?void 0:e.nextElementSibling)||e)}},[A]);let ea=(0,n.useCallback)(()=>{B.show({type:v.Oo})},[B]),en=(0,n.useCallback)(()=>{B.show({type:v._k}),ee(!1)},[B]),ei=(0,n.useCallback)(async e=>{if(K&&F){ea(),ee(!1);return}let t=await (0,x.B)(Y,M);(0,m.l)(e,W,X,{loggedInTrigger:ea,emailInUseTrigger:en,setErrors:e=>{H(e),ee(""===e)},track:J},{email:K,language:$,country:N,pathInfo:z,reCaptchaToken:t,trackEvent:"ctaBlock",packages:E.mJ})},[N,K,en,F,$,ea,z,X,J,W,Y,M]),eo=(0,n.useCallback)(async e=>{try{return(0,P.T9)(),await (0,C.RL)({email:K,campaignCode:T,optIn:e,locale:X.locale})}catch(e){return(0,S.Z)("warn",{message:"Failed to subscribe user to newsletter",error:e,data:{url:X.asPath}}),{statusCode:500,errorMessage:""}}finally{(0,P.Sr)()}},[K,T,X.asPath,X.locale]),ec=(0,n.useCallback)(()=>!!(r||(null==y?void 0:y.countries)&&(y.countries.includes(N.toUpperCase())||y.countries.includes("ALL"))),[null==y?void 0:y.countries,N,r]),el=(0,n.useCallback)(async e=>{let t=ec(),{statusCode:r,errorMessage:a}=await eo(t),n={subscribed:201===r,alreadySubscribed:208===r};if(n.subscribed||n.alreadySubscribed){B.show({type:v.Rk}),_&&(location.href=_),J(v.Ms,{action:"Resource Download",list_name:T,checkbox:+t,email:K},e),ee(!1);return}ee(!1),H(a||W.gettext("Unable to subscribe to newsletter"))},[K,ec,T,_,B,eo,J,W]),es=(0,n.useCallback)(async e=>{if(ee(!0),e.preventDefault(),await (0,L.P)(),!K){ee(!1),H(W.gettext("Email should not be blank."));return}if(!k()(K)){ee(!1),H(W.gettext("Please enter a valid email"));return}if("newsletter"===u&&T&&"default"!==T){await el(e);return}await ei(e)},[K,el,ei,T,W,u]),eu=(0,n.useCallback)(e=>{if(!I){let e=(0,b.fb)("signup_block");J(e.eventKey,e.properties),O(!0)}V(e.target.value),H("")},[I,J]),ed=0;n.Children.forEach(t,e=>{var t,r;n.isValidElement(e)&&((null==e?void 0:null===(t=e.props)||void 0===t?void 0:t.componentName)==="button"||(null==e?void 0:null===(r=e.props)||void 0===r?void 0:r.componentName)==="link")&&ed++});let ep=n.Children.map(t,e=>{if(n.isValidElement(e)){var t;let r={onChange:eu,onClick:es,errorMessage:q,disabled:U};return(2===ed||(null===(t=e.props)||void 0===t?void 0:t.href))&&(r=d()(r,"onClick")),n.cloneElement(e,r)}return e}),ef=(0,n.useCallback)(e=>{Q(!0),(0,S.Z)("error",{message:"Error loading recaptcha script in inline-from: ".concat(u),error:e})},[u]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.a,{twoButtons:2===ed,className:D,children:ep}),et&&(0,Z.createPortal)((0,a.jsx)("div",{className:R().recaptchaDisclaimer,children:(0,a.jsx)(c.cE,{textTemplate:W.gettext("This site is protected by reCAPTCHA and the Google {{Privacy Policy}} and {{Terms of Service}} apply."),children:(e,t)=>[(0,a.jsx)(l.Link,{href:"https://policies.google.com/privacy?hl=".concat(z.language),target:"_blank",children:e},1),(0,a.jsx)(l.Link,{href:"https://policies.google.com/terms?hl=".concat(z.language),target:"_blank",children:t},2)]})}),et),(0,a.jsx)(j.H,{onError:ef,onLoad:()=>G(!0)})]})}},16784:function(e,t,r){"use strict";r.r(t),r.d(t,{Link:function(){return p}});var a=r(85893),n=r(82213),i=r(54806),o=r(11163),c=r(6545);let l=(e,t)=>r=>{e(t.eventKey,{action:t.action,option:t.option},r)};var s=r(32757),u=r(7338);r(67294);let d=(e,t,r,a)=>{if(t.startsWith("#"))return t;if(t.startsWith("http"))return r&&r.find(e=>t.includes("/".concat(e)))?t:t.replace(e,"".concat(e,"/").concat(u.ZW.code));let n=t,i=null!=a?a:u.ZW.code,[o]=(n=n.startsWith("/")?n.substring(1):n).split("/");return o&&(null==r?void 0:r.includes(o))&&(i=o),i!==u.ZW.code||n.startsWith(u.ZW.code)||(n="".concat(u.ZW.code,"/").concat(n)),"".concat(e,"/").concat(n)},p=e=>{let t,{actionable:r,href:u,children:p,Component:f=n.r,onClick:h,tracking:g,showDisclaimer:m,...v}=e,{locale:b,locales:w}=(0,o.useRouter)(),y=(0,c.Ke)(),{serviceUrl:k}=(0,s.u)(),C=(0,i.S)(r,m).onClick;if(r||h)return r?t=C:h&&(t=e=>{g&&l(y,g)(e),h(e)}),(0,a.jsx)(f,{onClick:t,...v,children:p});if(g&&(t=l(y,g)),u){let e=d(k,u,w,b);return(0,a.jsx)(f,{onClick:t,href:e.replace(/([^:]\/)\/+/g,"$1"),...v,children:p})}return(0,a.jsx)(f,{onClick:t,...v,children:p})}},38290:function(e,t,r){"use strict";r.d(t,{H:function(){return u}});var a=r(85893),n=r(4298),i=r.n(n),o=r(3695),c=r(67294),l=r(98220),s=r(55725);let u=e=>{let{onLoad:t,onError:r}=e,n=(0,o.j)("RECAPTCHA_KEY"),[u,d]=(0,c.useState)(0),p="https://www.google.com/recaptcha/api.js?render=".concat(n).concat(u?"&retry=".concat(u):""),f=(0,c.useCallback)(async e=>{if(3!==u){(0,l.Z)("info",{message:"Failed to load recaptcha script, retrying ..."}),await (0,s.Z)(2e3);let e=document.querySelector('script[src="'.concat(p,'"]'));e&&e.remove(),d(e=>e+1)}else r(e)},[r,u,p]);return(0,a.jsx)(i(),{src:p,"data-testid":"recaptcha-script",onError:f,onLoad:t},u)}},54806:function(e,t,r){"use strict";r.d(t,{S:function(){return s}});var a=r(67294),n=r(66195),i=r(77513),o=r(6545),c=r(98220),l=r(75846);function s(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=(0,n.v)(),s=(0,o.aF)();return{onClick:(0,a.useCallback)(async a=>{if(a.preventDefault(),await (0,l.P)(),!e||!r.show)return;let{type:n,properties:o}=e;if(n===i.CX&&o.modal===i.dD&&r.setShowDisclaimer(t),n===i.dJ&&n in o)o[n]===i.Yk?window.Optanon?window.Optanon.ToggleInfoDisplay():(0,c.Z)("warn",{message:"Failed to load Optanon object"}):function(){if(!LeadBooster){(0,c.Z)("error",{message:"Failed to open leadbooster. Not found"});return}LeadBooster.trigger("open")}();else if(!(i.dJ in o)){let t=n===i.CX&&"modal"in o?o.modal:e.type;r.show({type:t,additionalProps:o})}s(e,a)},[r,e,s,t])}}},75846:function(e,t,r){"use strict";r.d(t,{P:function(){return a}});let a=()=>new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)})})},95893:function(e,t,r){"use strict";r.d(t,{B:function(){return c}});var a=r(3695),n=r(98220),i=r(55725);let o=(0,a.j)("RECAPTCHA_KEY");async function c(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4;try{return await Promise.race([new Promise((e,t)=>{grecaptcha.ready(()=>{try{e(grecaptcha.execute(o,{action:"submit"}))}catch(e){t(e)}})}),new Promise((e,t)=>setTimeout(()=>{t(Error("Recaptcha validation timeout for grecaptcha.execute"))},12e3))])}catch(o){let a="Recaptcha validation failed: ".concat(null==o?void 0:o.message,"; grecaptcha loaded: ").concat(e,"; onError triggered: ").concat(t);if(r>0)return(0,n.Z)("info",{message:"".concat(a,", retrying ...")}),await (0,i.Z)(2e3),await c(e,t,r-1);return(0,n.Z)("warn",{message:a}),a}}},20061:function(e,t,r){"use strict";r.d(t,{l:function(){return l}});var a=r(86471),n=r(81445),i=r(76114);let o=e=>{let t=e;return e.includes(i.Sz.LeadboosterV2)&&!e.includes(i.Sz.Prospector)?t=e.concat(i.Sz.Prospector):!e.includes(i.Sz.LeadboosterV2)&&e.includes(i.Sz.Prospector)&&(t=e.concat(i.Sz.LeadboosterV2)),t.map(e=>{let t=1;return e===i.Sz.Prospector?t=20:e===i.Sz.SmartDocV2?t=30:e===i.Sz.Campaigns&&(t=1e3),{code:e,quantity:t}})};var c=r(61911);let l=async(e,t,r,i,l)=>{let{emailInUseTrigger:s,setErrors:u,track:d,setConsentError:p}=i,{email:f,language:h,country:g,pathInfo:m,trackEvent:v,selectedTier:b,packages:w,consent:y,marketingConsent:k,shareDataConsent:C,reCaptchaToken:S}=l;if(e.preventDefault(),(0,c.T9)(),"clientX"in e&&(0,n.R)(v,e,"Email",d),!y&&p)return p(t.gettext("This option is required"));let{redirectUrl:x,emailInUse:E,invalidEmail:P,validationError:j,error:L}=await (0,a.RQ)({user:{email:f,language:h,country:g},pathInfo:m,selectedTier:b,packages:w?o(w):[],translator:t,consentGiven:y,marketingConsent:k,shareDataConsent:C,reCaptchaToken:S});if((0,c.Sr)(),E)return u(""),s();if(P)return u(t.gettext("Please add a valid email address"));if(P||u(""),j)switch(j.errorKeyword){case"minLength":return u(t.gettext("Email is required"));case"email":return u(t.gettext("Please add a valid email address"));default:return u(t.gettext("An error occurred"))}return L?u(L):x?r.push(x):u(t.gettext("An error occurred"))}},81445:function(e,t,r){"use strict";function a(e,t,r,a){a(e,{action:"provide_email",option:r},t)}r.d(t,{R:function(){return a}})},71077:function(e){e.exports={recaptchaDisclaimer:"inline-form-wrapper_recaptchaDisclaimer__e3RVX"}},82213:function(e,t,r){"use strict";r.d(t,{r:function(){return o}});var a=r(93967),n=r(67294);let i=(0,r(20551).Q)("link"),o=n.forwardRef(function({className:e,display:t="inline",href:r,target:o,onClick:c,htmlProps:l,children:s,color:u="blue",defaultSpacing:d=!0,textDecoration:p=!0,component:f},h){let g=f??"a";return n.createElement(g,{...l,className:a("a"!==g&&"unset",i,`${i}--display-${t}`,e,"gray"===u&&`${i}--gray`,"secondary-dark"===u&&`${i}--secondary-dark`,"light-gray"===u&&`${i}--light-gray`,"light-inverted"===u&&`${i}--light-inverted`,"light-blue"===u&&`${i}--light-blue`,!p&&`${i}--no-decoration`,!d&&`${i}--no-spacing`),href:r,ref:h,target:o,onClick:c},s)});o.displayName="Link"}}]);